   
package com.cait.dutyfree.common;

/**
 * @author Rasika Kaluwalgoda
 *
 */
 
import javax.servlet.ServletContext;

import org.springframework.context.ApplicationContext; 
import org.springframework.web.context.support.WebApplicationContextUtils; 
 
public class ServiceFinder { 

	public static Object findBean(String beanName, ServletContext servletContext){

		ApplicationContext appContext = WebApplicationContextUtils.getWebApplicationContext(servletContext);
		Object obj = appContext.getBean(beanName);
		return obj;

	}
	

 } 
